package cn.net.ecode.tools.ecodeplatformmaker.action;

import org.eclipse.jface.action.Action;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.internal.IWorkbenchGraphicConstants;
import org.eclipse.ui.internal.WorkbenchImages;

import cn.net.ecode.tools.ecodeplatformmaker.dialog.EditConn;

public class ConnAddAction extends Action {
	private IWorkbenchWindow workbenchWindow;
	public static final String ID = "ConnAddAction";
	public ConnAddAction(IWorkbenchWindow window) {
		if(window ==null)
			throw new IllegalArgumentException();
		workbenchWindow=window;
		setId(ID);
		setAccelerator(SWT.ALT+'n');
		setText("添加数据库连接");
	}

	public void run() {
		EditConn pd = new EditConn(null);
		pd.open();
		
		super.run();
	}
}
